<div class="panel panel-primary">
	<div class="panel-heading font-160">{{'Tab.observations' | translate}}</div>
	<div class="panel-body">
		<message-error-panel ng-model="message" auto-close="true"></message-error-panel>
		<div class="bot-10" ng-if="config.editable">
			<button type="button" class="btn btn-warning btn-sm" ng-click="add()"><span class="glyphicon glyphicon-plus-sign"></span></button>
		</div>
		<table class="table table-striped">
			<thead>
				<tr>
					<th>#</th>
					<th>{{'Observation.title' | translate}}</th>
					<th>{{'Observation.created' | translate}}</th>
					<th>{{'Observation.auditable.date' | translate}}</th>
					<th>{{'Observation.auditable.userName' | translate}}</th>
					<th>{{'options' | translate}}</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="observation in observations">
					<td>{{$index + 1}}</td>
					<td>{{observation.title}}</td>
					<td>{{observation.created |  date : 'dd/MM/yyyy HH:mm'}}</td>
					<td>{{observation.auditable.date | date : 'dd/MM/yyyy HH:mm'}}</td>
					<td>{{observation.auditable.userName}}</td>
					<td class="vert-align">
						<button ng-if="config.editable" type="button" class="btn btn-warning btn-sm" ng-click="edit(observation)"><span class="glyphicon glyphicon-edit"></span></button>
						<button ng-if="config.editable" type="button" class="btn btn-warning btn-sm" ng-click="remove(observation)"><span class="glyphicon glyphicon-trash"></span></button>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>